import request from '@/utils/request'

// 头部分类导航
export const getTopCategory = () => {
  return request({
    method: 'GET',
    url: '/home/category/head'
  })
}

// 全部分类
export const getAllCategory = (id) => {
  return request({
    method: 'GET',
    url: `/category?id=${id}`
  })
}
// 二级分类
export const getSubFilter = (id) => {
  return request({
    method: 'GET',
    url: `/category/sub/filter?id=${id}`
  })
}
// 二级分类
export const getSubGoods = (data) => {
  return request({
    method: 'POST',
    url: `/category/goods/temporary`,
    data
  })
}